package cn.zc.student.service.controller;


import cn.zc.student.entity.Dto.StudentExercisesRespondenceDto;
import cn.zc.student.entity.StudentExercisesRespondence;
import cn.zc.student.service.service.StudentExercisesRespondenceService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.web.bind.annotation.*;

import javax.annotation.Resource;
import java.util.List;

/**
 * <p>
 * 学生练习题作答 前端控制器
 * </p>
 *
 * @author keno
 * @since 2022-02-23
 */
@Api(tags = "学生练习题作答记录")
@RestController
@RequestMapping("/student")
public class StudentExercisesRespondenceController {

    @Resource
    private StudentExercisesRespondenceService studentExercisesRespondenceService;

    @ApiOperation(value = "保存作答记录")
    @PostMapping("/create/StudentExercisesRespondence")
    private boolean createStudentExercisesRespondence(List<StudentExercisesRespondence> list){
        return studentExercisesRespondenceService.createStudentExercisesRespondence(list);
    }

    @ApiOperation(value = "查询作答记录")
    @GetMapping("/find/StudentExercisesRespondence")
    private List<StudentExercisesRespondenceDto> findStudentExercisesRespondence(String menuId,String studentId){
        return studentExercisesRespondenceService.findStudentExercisesRespondence(menuId,studentId);
    }

}

